﻿using LiuQiuRong.Chat.Utilities.Enum;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Threading.Tasks;

namespace LiuQiuRong.Chat.Businesses.Hubs
{
    public class ChatHub : Hub
    {
        public async Task SendMessage(string user, string message)
        {
            message = message.Replace("\n", "<br/>");
            await Clients.All.SendAsync("ReceiveMessage", user, message, DateTime.Now.ToString(DateTimeFormat.yyyyMMddHHmmss));
        }
    }
}
